/**
 * 
 */
package fr.utbm.gi.vi51.slizers.framework.environment;

import java.util.Collection;

import fr.utbm.gi.vi51.slizers.pw.agent.action.CreatureActionInfluence;
import fr.utbm.gi.vi51.slizers.pw.agent.action.UnconsideredAction;
import fr.utbm.gi.vi51.slizers.pw.environment.UnconsideredWorldElement;

/**
 * Abstract implementation of an influence conflict solver.
 * 
 * @author Tarik Belabbas
 *
 */
public abstract class InfluenceConflictSolver< EnvironmentType extends Environment >
{
	/**
	 * The environment for which the influences must be collected.
	 */
	private final EnvironmentType environment;
	
	/**
	 * Parameterized constructor.
	 */
	public InfluenceConflictSolver( EnvironmentType _environment )
	{
		this.environment = _environment;
	}
	
	/**
	 * Returns the environment.
	 *
	 * @return the environment
	 */
	public EnvironmentType getEnvironment()
	{
		return this.environment;
	}

	/**
	 * Solves conflicts in the given influences.
	 * 
	 * @param _influences the influences for which the conflicts must be solved
	 * @return the influences without conflicts
	 * @throws UnconsideredWorldElement 
	 * @throws UnconsideredAction 
	 */
	public abstract Collection< CreatureActionInfluence > solveInfluenceConflicts(
			Collection< CreatureActionInfluence > _influences );
}
